| Plant | Flowers | Date | lon | lat | ele | Month | Year | julian |
|---|---|---|---|---|---|---|---|---|
| Glossoloma oblongicalyx | 4 | 2015-10-19 | -78.59093 | 0.130838 | 2270 | October | 2015 | 292 |
| Gasteranthus quitensis | 2 | 2016-10-17 | -78.59770 | 0.120070 | 1940 | October | 2016 | 291 |
| Kohleria affinis | 1 | 2016-12-13 | -78.59534 | 0.126746 | 2110 | December | 2016 | 348 |
| Columnea ciliata | 3 | 2014-02-27 | -78.59934 | 0.116682 | 1960 | February | 2014 | 58 |
| Columnea medicinalis | 1 | 2014-04-23 | -78.59372 | 0.128700 | 2130 | April | 2014 | 113 |
| Drymonia teuscheri | 3 | 2016-07-28 | -78.59245 | 0.129393 | 2200 | July | 2016 | 210 |
| Plant | Flowers | Date | lon | lat | ele | Month | Year | julian |
|---|---|---|---|---|---|---|---|---|
| Glossoloma oblongicalyx | 4 | 2015-10-19 | -78.59093 | 0.130838 | 2270 | October | 2015 | 292 |
| Gasteranthus quitensis | 2 | 2016-10-17 | -78.59770 | 0.120070 | 1940 | October | 2016 | 291 |
| Kohleria affinis | 1 | 2016-12-13 | -78.59534 | 0.126746 | 2110 | December | 2016 | 348 |
| Columnea ciliata | 3 | 2014-02-27 | -78.59934 | 0.116682 | 1960 | February | 2014 | 58 |
| Columnea medicinalis | 1 | 2014-04-23 | -78.59372 | 0.128700 | 2130 | April | 2014 | 113 |
| Drymonia teuscheri | 3 | 2016-07-28 | -78.59245 | 0.129393 | 2200 | July | 2016 | 210 |
As range
## sink("model/threshold_baseline.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[PredPlant[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2324
## Unobserved stochastic nodes: 2926
## Total graph size: 14658
##
## Initializing model
## sink("model/threshold_attraction.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=inverse(vCov*gamma)
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,5)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(0,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2324
## Unobserved stochastic nodes: 3000
## Total graph size: 26254
##
## Initializing model
Mean phylogenetic covariance
## sink("model/threshold_repulsion.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=vCov*gamma
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,5)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(0,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2324
## Unobserved stochastic nodes: 3000
## Total graph size: 26253
##
## Initializing model
Mean phylogenetic covariance martix
## sink("model/threshold_attraction.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=inverse(vCov*gamma)
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,5)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(0,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2324
## Unobserved stochastic nodes: 3000
## Total graph size: 26410
##
## Initializing model
## sink("model/threshold_repulsion.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=vCov*gamma
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,5)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(0,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2324
## Unobserved stochastic nodes: 3000
## Total graph size: 26409
##
## Initializing model
## sink("model/threshold_repulsion.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=vCov*gamma
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,5)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(0,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2324
## Unobserved stochastic nodes: 3000
## Total graph size: 26409
##
## Initializing model
Mean interaction covariance
## sink("model/threshold_repulsion.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=vCov*gamma
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,5)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(0,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2324
## Unobserved stochastic nodes: 3000
## Total graph size: 26409
##
## Initializing model
Mean interaction covariance martix
The probability of occurrence.
## Omega: The magnitude of the effect of autocorrelation on mean flowering occurrence
## # A tibble: 6 x 2
## Model p
## <chr> <dbl>
## 1 interaction_attraction 0.83
## 2 interaction_repulsion 0.87
## 3 phylogenetic_attraction 0.826
## 4 phylogenetic_repulsion 0.86
## 5 trait_attraction 0.798
## 6 trait_repulsion 0.866
| Model | mean | lower | upper |
|---|---|---|---|
| trait_attraction | 0.1810350 | 0.1720660 | 0.1912900 |
| phylogenetic_attraction | 0.1747943 | 0.1665331 | 0.1838644 |
| trait_repulsion | 0.1685558 | 0.1558987 | 0.1798563 |
| phylogenetic_repulsion | 0.1635166 | 0.1538285 | 0.1748955 |
| interaction_repulsion | 0.1618169 | 0.1526637 | 0.1709591 |
| interaction_attraction | 0.1588072 | 0.1490508 | 0.1679450 |
Without baseline
Zoom in
| Model | mean | lower | upper |
|---|---|---|---|
| baseline | 0.2474558 | 0.2227041 | 0.2738095 |
| trait_attraction | 0.2056599 | 0.1836735 | 0.2279762 |
| phylogenetic_attraction | 0.2024694 | 0.1802721 | 0.2244898 |
| trait_repulsion | 0.2017007 | 0.1785714 | 0.2261905 |
| phylogenetic_repulsion | 0.1961565 | 0.1734694 | 0.2176871 |
| interaction_repulsion | 0.1961224 | 0.1717687 | 0.2193878 |
| interaction_attraction | 0.1932585 | 0.1700680 | 0.2159864 |